package com.tiger.project.domain;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tiger.common.annotation.Excel;
import com.tiger.common.core.domain.BaseEntity;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;


/**
 * 【租金收款】对象 asset_receipt
 *
 * @author standard
 * @date 2022-09-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "asset_receipt对象", description = "【租金收款】内容")
public class AssetReceipt extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    private Long id;

    /**
     * 合同发起编号
     */
    @Excel(name = "合同发起编号")
    @ApiModelProperty(value = "合同发起编号")
    private String contractSponsorNo;

    /**
     * 合同发起id
     */
    @Excel(name = "合同发起id")
    @ApiModelProperty(value = "合同发起id")
    private Long contractSponsorId;

    /**
     * 资产id
     */
    @Excel(name = "资产id")
    @ApiModelProperty(value = "资产id")
    private String assetId;

    /**
     * 资产名称  逗号拼接
     */
    @Excel(name = "资产名称  逗号拼接")
    @ApiModelProperty(value = "资产名称  逗号拼接")
    private String assetName;

    /**
     * 决策依据id
     */
    @Excel(name = "决策依据id")
    @ApiModelProperty(value = "决策依据id  逗号拼接")
    private String decisionId;

    /**
     * 承租人id
     */
    @Excel(name = "承租人id")
    @ApiModelProperty(value = "承租人id")
    private Long lesseeId;

    @ApiModelProperty(value = "收款次数")
    private Integer receiptNum;

    /**
     * 承租人名称
     */
    @Excel(name = "承租人名称")
    @ApiModelProperty(value = "承租人名称 客户名称")
    private String lesseeName;


    /**
     * 出租人id
     */
    @Excel(name = "出租人id")
    @ApiModelProperty(value = "出租人id 开票单位id")
    private Long lessorId;

    /**
     * 出租人名称
     */
    @Excel(name = "出租人名称")
    @ApiModelProperty(value = "出租人名称  开票单位名称")
    private String lessorName;

    /**
     * 开票金额
     */
    @Excel(name = "开票金额")
    @ApiModelProperty(value = "开票金额")
    private BigDecimal invoiceAmount;

    /**
     * 减免金额
     */
    @Excel(name = "减免金额")
    @ApiModelProperty(value = "减免金额")
    private BigDecimal creditAmount;

    @ApiModelProperty(value = "减免原因")
    private String creditRemark;

    /**
     * 发票类型 1-普通发票 2-专用发票 3-收据
     */
    @ApiModelProperty(value = "发票类型 1-普通发票 2-专用发票 3-收据")
    private String isDedicated;

    /**
     * 开票期限
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开票期限", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "开票期限")
    private Date invoiceTime;

    /**
     * 租赁总额
     */
    @Excel(name = "租赁总额")
    @ApiModelProperty(value = "租赁总额")
    private BigDecimal rentRental;

    /**
     * 合同类别  1-房屋租赁合同，2-土地租赁合同
     */
    @Excel(name = "合同类别  1-房屋租赁合同，2-土地租赁合同")
    @ApiModelProperty(value = "合同类别  1-房屋租赁合同，2-土地租赁合同")
    private String contractType;

    /**
     * 付款周期 1-月，2-季，3-半年，4-年，5-一次性付清
     */
    @Excel(name = "付款周期 1-月，2-季，3-半年，4-年，5-一次性付清")
    @ApiModelProperty(value = "付款周期 1-月，2-季，3-半年，4-年，5-一次性付清")
    private String paymentCycle;

    /**
     * 开票号
     */
    @ApiModelProperty(value = "开票号")
    private String invoiceNo;

    /**
     * 开票日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "OA返回 开票日期")
    private Date makeInvoiceTime;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "创建时间")
    private Date createdAt;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新时间")
    private Date updatedAt;

    /**
     * 创建人
     */
    @Excel(name = "创建人")
    @ApiModelProperty(value = "创建人")
    private Long createById;

    /**
     * 创建人名称
     */
    @Excel(name = "创建人名称")
    @ApiModelProperty(value = "创建人名称")
    private String createByName;

    /**
     * 更新人
     */
    @Excel(name = "更新人")
    @ApiModelProperty(value = "更新人")
    private Long updateById;

    /**
     * 更新人名称
     */
    @Excel(name = "更新人名称")
    @ApiModelProperty(value = "更新人名称")
    private String updateByName;

    /**
     * 租户id(0--平台用户 非0--正常租户)
     */
    @Excel(name = "租户id(0--平台用户 非0--正常租户)")
    @ApiModelProperty(value = "租户id(0--平台用户 非0--正常租户)")
    private Long tenantId;

    @ApiModelProperty(value = "公司id")
    private Long companyId;

    /**
     * 租金收款 0-待开票 1-未提交，2-审批中，3-审批通过，4-已驳回
     */
    @Excel(name = "1-未提交，2-审批中，3-审批通过，4-已驳回")
    @ApiModelProperty(value = "租金收款审核 0-待开票 1-未提交，2-审批中，3-审批通过，4-已驳回")
    private Long status;

    /**
     * 0-租金收款 1-租金进账
     */
    @ApiModelProperty(value = "0-租金收款 1-租金进账")
    private String isType;

    /** 删除标志 1-是，0-否 */
    @Excel(name = "删除标志 1-是，0-否")
    @ApiModelProperty(value = "删除标志 1-是，0-否")
    private Long isDeleted;


    /**
     * 租金进账 0-待进账 ，1-未提交，2-审批中，3-审批通过，4-已驳回
     */
    @Excel(name = "1-未提交，2-审批中，3-审批通过，4-已驳回")
    @ApiModelProperty(value = "租金进账审核 0-待进账，1-未提交，2-审批中，3-审批通过，4-已驳回")
    private Long recordStatus;

    @ApiModelProperty(value = "决策依据集合")
    private List<CommonDecision> commonDecisionList = new ArrayList<>();
    @ApiModelProperty(value = "合同发起集合")
    private List<ContractSponsor> sponsorList = new ArrayList<>();
    @ApiModelProperty
    private List<ContractBill> contractBillList = new ArrayList<>();
    @ApiModelProperty(value = "租金进账附件集合")
    private List<AssetCollectionRecordEnclosure> enclosureList = new ArrayList<>();
    @ApiModelProperty(value = "租金进账记录集合")
    private List<AssetCollectionRecord> collectionRecordList = new ArrayList<>();


    @ApiModelProperty(value = "总期数")
    private Integer rentPeriods;

    @ApiModelProperty(value = "累计应收  租金收款  累计应付金额")
    private BigDecimal countMoney;

    @ApiModelProperty(value = "累计到账 租金进账  累计已付金额")
    private BigDecimal totalAccount;

    @ApiModelProperty(value = "当前期数")
    private Integer nowPeriod;

    @ApiModelProperty(value = "账期开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date rentStateTime;

    @ApiModelProperty(value = "账期结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date rentEndTime;

    @ApiModelProperty(value = "本期应收  租金收款")
    private BigDecimal currentIncome;

    @ApiModelProperty(value = "本期到账 租金进账")
    private BigDecimal currentIncomeRecord;

    @ApiModelProperty(value = "本期实收 租金收款")
    private BigDecimal officialReceipts;

    @ApiModelProperty(value = "租金分配 本期分配")
    private BigDecimal allocation;

    @ApiModelProperty(value = "租金分配  未分配金额")
    private BigDecimal noAllocation;

    @ApiModelProperty(value = "剩余天数")
    private Integer residueDay;

    @ApiModelProperty(value = "本期回款率")
    private Float currentTransferRate;

    @ApiModelProperty(value = "累计汇款率")
    private Float totalTransferRate;

    @ApiModelProperty(value = "累计实收  租金收款")
    private BigDecimal totalReceipts;

    @ApiModelProperty(value = "账单状态 1-待付款 2-未缴清 3-已缴清")
    private String allocationType;

    @ApiModelProperty(value = "收款预警时该字段赋值为1")
    private Long warning;

    @ApiModelProperty(value = "1-升序 2-降序")
    private Long rank;

    @ApiModelProperty(value = "租金到账集合")
    private List<AssetReceiptAccount> assetReceiptAccountList = new ArrayList<>();


    @ApiModelProperty(value = "租金进账OA审批链接")
    private String recordOaFile;

    @ApiModelProperty(value = "租金收款OA审批链接")
    private String getOaFile;

    @ApiModelProperty(value = "合同名称")
    private String name;



}
